﻿@inject Microsoft.AspNetCore.Hosting.IWebHostEnvironment HostingEnvironment
@using YiSha.Entity.OrganizationManage;
@{ 
    MyEntity my = ViewBag.Mylist;
}


<!DOCTYPE html>
<!--[if IE 8 ]><html class="ie" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
<!--<![endif]-->
<head>
    <!-- Basic Page Needs -->
    <meta charset="utf-8">
    <!--[if IE]><meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'><![endif]-->
    <title>@my.MyTitle</title>
    <meta name="keywords" content="@my.MyGuanjianzi">
    <meta name="description" content="@my.MyMiaoshu">

    <!-- Mobile Specific Metas -->
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

    <!-- Theme Style -->
    <link rel="stylesheet" type="text/css" href="~/assets/css/style.css">

    <!-- Favicon and Touch Icons  -->
    <link rel="shortcut icon" href="~/assets/icon/favicon.png">
    <link rel="apple-touch-icon-precomposed" href="~/assets/icon/apple-touch-icon-158-precomposed.png">



    <script src="~/assets/js/jquery.min.js"></script>
    <link href="~/assets/css/swiper.min.css" rel="stylesheet" />
    <script src="~/js/vue.min.js"></script>
    <!------js传递参数---------->
    <script src="~/assets/js/paragram.js"></script>
    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <script src="~/assets/js/swiper.min.js"></script>
    <script src="~/assets/js/bootstrap.min.js"></script>
    <script src="~/assets/js/bootstrap-select.min.js"></script>
    <script src="~/assets/js/animsition.js"></script>
    <script src="~/assets/js/jquery.appear.min.js"></script>
    <script src="~/assets/js/countto.js"></script>
    <script src="~/assets/js/slick.min.js"></script>
    <script src="~/assets/js/jquery.stickit.min.js"></script>
    <script src="~/assets/js/jquery.parallax-1.1.3.js"></script>
    <script src="~/assets/js/masonry.pkgd.min.js"></script>
    <script src="~/assets/js/magnific.popup.min.js"></script>
    <script src="~/assets/js/wow.min.js"></script>
    <script src="~/assets/js/main.js"></script>
</head>
<body>


    <div class="animsition">
        <div class="site-wrapper header-top-with">
            <!-- header-area -->
            <header id="header" class="main-header fullwidth">
                <div class="header-top">
                    <div class="container">
                        <div class="top-left">
                            <ul class="clearfix">
                                <li>奔达官方网站</li>
                                <li><a href="@my.MyUrl" target="_blank">官方商城 <i class="fa fa-long-arrow-alt-right"></i></a></li>
                            </ul>
                        </div>
                        <div class="top-right clearfix">
                            <p><i class="fa fa-phone"></i>@my.MyTel</p>

                        </div>
                    </div>
                </div>
                <div class="container">
                    <a class="main-logo" href="/"><img src="~/assets/img/logo.png" alt="autoshow"></a>
                    <ul class="header-buttons">
                        <li class="dropdown">
                            <a class="user-trigger" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"><i class="fa fa-user-circle" aria-hidden="true"></i></a>
                            @*<ul class="dropdown-menu">
                                <li><a href="#">用户登录</a></li>

                                <li><a href="#">退出</a></li>
                            </ul>*@
                        </li>
                        <li><a class="search-trigger">Search<span></span></a></li>
                        <li><a class="nav-trigger">菜单<span></span></a></li>
                    </ul>
                    <nav class="nav">
                        <ul id="primary-nav" class="primary-nav is-fixed">
                            <li><a href="/">首页</a></li>

                            <li class="has-children">
                                <a>关于我们</a>
                                <ul class="dropdown-nav is-hidden">
                                    <li><a href="/Content?ContentType=1">公司简介</a></li>
                                    <li v-for="item in typeList">
                                        <a :href="newsUrl_type+item.DictKey" v-if="item.DictKey==3">{{item.DictValue}}</a>
                                        <a :href="newsUrl+item.DictKey" v-else-if="item.DictKey==4">{{item.DictValue}}</a>
                                    </li>

                                </ul>
                            </li>
                            <li class="has-children">
                                <a>产品中心</a>
                                <ul class="nav-gallery is-hidden">
                                    <li class="nav-drop-close"></li>
                                    <li class="go-back"><a href="#0">菜单</a></li>
                                    <li class="see-all"><a href="/Product">全部车型</a></li>
                                

                                    <li v-for="item in productList.slice(0,5)">
                                        <a class="nav-item" :href="url+item.Id">
                                            <img :src="item.CoverImage" alt="Model1">
                                            <h3>{{item.MotoTitle}}</h3>
                                            <p class="price">{{item.MotoPrice}}<br /><small>{{item.MotoSubtitle}}</small></p>
                                            <p class="tech">
                                                <span><i class="fa fa-gears" title="Motor power"></i> <small>{{item.MotoPailiang}}</small> </span>
                                                <span><i class="fa fa-dashboard" title="0 - 100 km / h acceleration"></i> <small>{{item.MotoJiasu}}</small> </span>
                                                <span><i class="fa fa-motorcycle" title="Fuel consumption"></i> <small>{{item.MotoZhiliang}}</small> </span>
                                            </p>
                                        </a>
                                    </li>


                                </ul>
                            </li>
                            <li class="has-children">
                                <a>新闻中心</a>
                                <ul class="dropdown-nav is-hidden">
                                    <li v-for="item in typeList">
                                        <a :href="newsUrl_type+item.DictKey" v-if="item.DictKey!=3 && item.DictKey!=4">{{item.DictValue}}</a>
                                    </li>

                                </ul>
                            </li>
                            <li><a href="/Outlets">服务网点</a></li>
                            <li class="has-children">
                                <a>联系我们</a>
                                <ul class="dropdown-nav is-hidden">
                                    <li v-for="item in typeListContnet">
                                        <a :href="contentUrl+item.DictKey" v-if="item.DictKey!=1">{{item.DictValue}}</a>
                                    </li>

                                    <li><a href="/Message">意见建议</a></li>
                                </ul>
                            </li>

                        </ul>
                    </nav>
                    <div id="search" class="search">
                        <form>
                            <input type="search" placeholder="Search keywords">
                        </form>
                    </div>

                </div>
            </header>
            <div class="overlay"></div>
           

            <!-- slider-area -->
            @RenderBody()
            <!-- cta bar -->
            <div class="cta-bar">
                <ul>
                    <li><a href="/Outlets"><i class="fa fa-map-pin"></i>服务网点</a></li>
                    <li><a href="/Product"><i class="fa fa-motorcycle"></i>全部车型</a></li>
                    <li><a href="#"><i class="fa fa-mobile-phone"></i> @my.MyTel</a></li>
                    <li><a href="#" class="back-to-top" title="Back to top"><i class="fa fa-angle-up"></i>返回顶部</a></li>
                </ul>
            </div>
            <!-- footer-area -->
            <footer class="site-footer dark">
                <div class="footer-area" id="footer">
                    <div class="container">
                        <div class="row">

                            <div class="col-xl-2 col-lg-2 col-md-3">
                                <div class="widget">
                                    <h3 class="widget-title">关于我们</h3>
                                    <div class="quick-links">
                                        <ul>
                                            <li><a href="/Content?ContentType=1">公司简介</a></li>
                                            <li v-for="item in typeList" v-if="item.DictKey==3">
                                                <a :href="newsUrl_type+item.DictKey">{{item.DictValue}}</a>                                              
                                            </li>
                                            <li v-for="item in typeList" v-if="item.DictKey==4">
                                                <a :href="newsUrl+item.DictKey">{{item.DictValue}}</a>
                                            </li>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                            <div class="col-xl-3 col-lg-3 col-md-4">
                                <div class="widget">
                                    <h3 class="widget-title">产品展示</h3>
                                    <div class="quick-links">
                                        <ul>
                                            <li v-for="item in productList"><a :href="url+item.Id">{{item.MotoTitle}}</a></li>

                                        </ul>
                                    </div>
                                </div>
                            </div>
                            <div class="col-xl-2 col-lg-2 col-md-3">
                                <div class="widget">
                                    <h3 class="widget-title">新闻中心</h3>
                                    <div class="quick-links">
                                        <ul>
                                            <li v-for="item in typeList"  v-if="item.DictKey!=3 && item.DictKey!=4">
                                                <a :href="newsUrl_type+item.DictKey">{{item.DictValue}}</a>
                                            </li>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                            <div class="col-xl-2 col-lg-2 col-md-3">
                                <div class="widget">
                                    <h3 class="widget-title">联系我们</h3>
                                    <div class="quick-links">
                                        <ul>
                                            <li v-for="item in typeListContnet" v-if="item.DictKey!=1">
                                                <a :href="contentUrl+item.DictKey">{{item.DictValue}}</a>
                                            </li>
                                            <li><a href="/Outlets">服务网点</a></li>
                                            <li><a href="/Message">意见建议</a></li>

                                        </ul>
                                    </div>
                                </div>
                            </div>
                            <div class="col-xl-3 col-lg-3 col-md-12">
                                <div class="row">
                                    <div class="col-xl-5 col-lg-5 col-md-12">
                                        <a href="#"><img src="@my.MyErweima" alt=""></a>
                                        <h6 class="text-white text-center">二维码</h6>
                                    </div>
                                    <div class="col-xl-5 col-lg-5 col-md-12">
                                        <a href="#"><img src="@my.MyXiaochengxu" alt=""></a>
                                        <h6 class="text-white text-center">小程序</h6>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="copyright">
                    <div class="container">
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="copyright-text">
                                    @my.MyBanquan
                                </div>
                            </div>
                            <div class="col-sm-6">
                                <div class="social">
                                    @my.MyJishu
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </footer>
        </div>
    </div>
    <!-- Javascript -->



    <script type="text/javascript">

        var vm = new Vue({
            el: "#header",
            data: {
                url: '/Product/ProductDetail?id=',
                newsUrl: '/News?NewsType=',
                newsUrl_type: '/News/Process?NewsType=',
                contentUrl: '/Content?ContentType=',
                productList: [],//产品
                newsList: [],//新闻
                typeList: [],//新闻类型
                typeListContnet: [],//内容类型
            },
            mounted() {

                this.getProductList();
                // this.getNewsList();

            },
            methods: {
                //获取列表
                getProductList() {
                    var that = this
                    $.ajax({
                        type: 'GET',
                        url: '/api/Moto/GetPageListJson?pageSize=20&pageIndex=1',
                        data: {},
                        success: function (res) {
                            that.productList = res.Result
                            vm.$forceUpdate();

                        }
                    });
                    $.ajax({
                        type: 'GET',
                        url: '/SystemManage/DataDictDetail/GetPageListJson?pageSize=20&pageIndex=1&sort=DictSort&sortType=Asc&DictType=NewsType',
                        data: {},
                        success: function (res) {
                            that.typeList = res.Result
                            vm.$forceUpdate();

                        }
                    });
                    $.ajax({
                        type: 'GET',
                        url: '/SystemManage/DataDictDetail/GetPageListJson?pageSize=20&pageIndex=1&sort=DictSort&sortType=Asc&DictType=ContentType',
                        data: {},
                        success: function (res) {
                            that.typeListContnet = res.Result
                            vm.$forceUpdate();

                        }
                    });

                },
                getNewsList() {
                    var that = this
                    $.ajax({
                        type: 'GET',
                        url: '/api/News/GetPageListJson?pageSize=10&pageIndex=1',
                        data: {},
                        success: function (res) {
                            that.newsList = res.Result
                            vm.$forceUpdate();

                        }
                    });
                },

            }
        })

    </script>
    <script type="text/javascript">

        var vm = new Vue({
            el: "#footer",
            data: {
                url: '/Product/ProductDetail?id=',
                newsUrl: '/News?NewsType=',
                newsUrl_type: '/News/Process?NewsType=',
                contentUrl: '/Content?ContentType=',
                productList: [],//产品
                newsList: [],//新闻
                typeList: [],//新闻类型
                typeListContnet: [],//内容类型
            },
            mounted() {

                this.getProductList();
                // this.getNewsList();

            },
            methods: {
                //获取列表
                getProductList() {
                    var that = this
                    $.ajax({
                        type: 'GET',
                        url: '/api/Moto/GetPageListJson?pageSize=20&pageIndex=1',
                        data: {},
                        success: function (res) {
                            that.productList = res.Result
                            vm.$forceUpdate();

                        }
                    });
                    $.ajax({
                        type: 'GET',
                        url: '/SystemManage/DataDictDetail/GetPageListJson?pageSize=20&pageIndex=1&sort=DictSort&sortType=Asc&DictType=NewsType',
                        data: {},
                        success: function (res) {
                            that.typeList = res.Result
                            vm.$forceUpdate();

                        }
                    });
                    $.ajax({
                        type: 'GET',
                        url: '/SystemManage/DataDictDetail/GetPageListJson?pageSize=20&pageIndex=1&sort=DictSort&sortType=Asc&DictType=ContentType',
                        data: {},
                        success: function (res) {
                            that.typeListContnet = res.Result
                            vm.$forceUpdate();

                        }
                    });

                },
                getNewsList() {
                    var that = this
                    $.ajax({
                        type: 'GET',
                        url: '/api/News/GetPageListJson?pageSize=10&pageIndex=1',
                        data: {},
                        success: function (res) {
                            that.newsList = res.Result
                            vm.$forceUpdate();
                            

                        }
                    });
                },

            }
        })

    </script>

</body>

</html>